# 斐波那契函数

def fibonacci_for_100():
    a = 0
    b = 1
    fibonacci_list = [a, b]
    for i in range(10):
        next_num = fibonacci_list[i] + fibonacci_list[i + 1]
        fibonacci_list.append(next_num)
    return fibonacci_list


def fibonacci_while_100():
    a = 0
    b = 1
    fibonacci_list = [a, b]
    i = 0
    while True:
        next_num = fibonacci_list[i] + fibonacci_list[i + 1]
        fibonacci_list.append(next_num)
        i += 1
        if i == 10:
            break
    return fibonacci_list

print(fibonacci_for_100())
print(fibonacci_while_100())
